/**
 * Created by JetBrains WebStorm.
 * User: Silence
 * Date: 3/31/12
 * Time: 9:21 AM
 * To change this template use File | Settings | File Templates.
 */

Ext.require('EM.model.budget.Source');

Ext.define('EM.store.SourceStore', {
    extend: 'Ext.data.Store',
    storeId: 'SourceStore',
    model: 'EM.model.budget.Source',
    autoLoad: true,
    autoSync: true,
    proxy: {
        type: 'ajax',
        //url: 'data/event/server_sources.php',
        api:{
            read: 'data/event/server_sources.php?item=read_sources',
            update: 'data/event/server_sources.php?item=update_sources',
            destroy: 'data/event/server_sources.php?item=delete_sources',
            create: 'data/event/server_sources.php?item=create_sources'
        },
        reader: {
            type:'json',
            //root:'source',
            successProperty:'success'
        },
        writer: {
            type:'json',
            //root:'source',
            successProperty:'success'
        }
    }
});